package com.kingyea.app.market.supplierAllocation.service;

import com.kingyea.app.market.supplierAllocation.bean.SupplierAllocation;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @version v1.0.0
 * @description SupplierAllocation 接口
 * @date Created in 2018-02-09 17:48:58
 */
public interface SupplierAllocationService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    SupplierAllocation getById(Integer id) throws Exception;

    /**
     * 列表
     *
     * @param supplierAllocation
     * @return
     */
    Object list(Map<String, Object> supplierAllocation) throws Exception;

    /**
     * 列表(不分页)
     *
     * @param supplierAllocation
     * @return
     */
    List<Object> listNoPage(Map<String, Object> supplierAllocation) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(Integer id) throws Exception;

    /**
     * 添加
     *
     * @param supplierAllocation
     * @return
     */
    void save(@Param(value = "list") List<Object> list) throws Exception;

    /**
     * 更新
     *
     * @param supplierAllocation
     * @return
     */
    SupplierAllocation update(SupplierAllocation supplierAllocation) throws Exception;


    Object getUserList(Map<String, Object> supplier) throws Exception;

    int deleteUser(String supplierCode, String loginAccount);

    Object getMarketList(Map<String, Object> supplierCode) throws Exception;

    int deleteMarket(String supplierCode, String marketCode);

    Object getLinkSupplier(Map<String, Object> supplierCode) throws Exception;

    int deleteSupplier(String supplierCode, String linkSupplier);

    List<SupplierAllocation> getBySupplierCode(Integer supplierCode);

    List<SupplierAllocation> getByMarket(String marketCode) throws Exception;
}

